<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    ul {
        width: 800px;
        height: 80px;
        margin: 100px auto;
    }

    ul li {
        perspective: 10000px;
    }

    ul li .box {
        position: relative;
        transform-style: preserve-3d;
        /* 让子级的效果能够生效*/
        transition: all .5s;
        width: 160px;
        height: 80px;
        float: left;
    }

    ul li .box:hover {
        transform: rotateX(90deg);
    }

    ul li .box .front,
    ul li .box .bottom {
        position: absolute;
        top: 0;
        left: 0;
        width: 160px;
        height: 80px;
        text-align: center;
        line-height: 80px;
    }

    ul li .box .front {
        z-index: 1;
        background-color: darkturquoise;
        transform: translateZ(40px);

    }

    ul li .box .bottom {
        background-color: firebrick;
        transform: translateY(50%) rotateX(-90deg)
            /* 注意是围绕哪个轴转的 */
    }
</style>

<body>
    <ul>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
        <li>
            <div class="box">
                <div class="front">front</div>
                <div class="bottom">bottom</div>
            </div>
        </li>
    </ul>
</body>

</html>